//
//  YZMSaleTradePacket.m
//  YZMicroStock
//
//  Created by wangminhong on 16/4/14.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import "YZMSaleTradePacket.h"
#import "YZMSaleTradeModel.h"
#import "Mantle+Utils.h"
#import <LinqToObjectiveC/LinqToObjectiveC.h>

@interface YZMSaleTradePacket()

@property (nonatomic, strong) NSDictionary *mapData;

@end

@implementation YZMSaleTradePacket

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"items": @"dataList",
             @"currentPage":@"pageIndex",
             @"totalPage":@"totalPage",
             @"tradingDeferCharge":@"tradingDeferCharge",
             @"unHanldHoldDeferCharge":@"unHanldHoldDeferCharge",
             @"holdDays":@"holdDays",
             @"holdNum":@"holdNum",
             @"investorUserId":@"investorUserId",
             @"profit":@"profit",
             @"realBuyPrice":@"realBuyPrice",
             @"realSellPrice":@"realSellPrice",
             @"realSellTime":@"realSellTime",
             @"realBuyTime":@"realBuyTime",
             @"status":@"status",
             @"stockCode":@"stockCode",
             @"stockName":@"stockName",
             @"strategyId":@"strategyId",
             @"userId":@"userId",
             };
}

-(void)setNilValueForKey:(NSString *)key{
    
}

+ (NSValueTransformer *)tradingDeferChargeJSONTransformer
{
    return [NSValueTransformer valueTransformerForName: MTLStringDoubleTransformerName];
}

+ (NSValueTransformer *)unHanldHoldDeferChargeJSONTransformer
{
    return [NSValueTransformer valueTransformerForName: MTLStringDoubleTransformerName];
}

+ (NSValueTransformer *)itemsJSONTransformer
{
    return [MTLJSONAdapter arrayTransformerWithModelClass: [YZMSaleTradeModel class]];
}

+ (NSValueTransformer *)realBuyTimeJSONTransformer{
    return [NSValueTransformer valueTransformerForName:MTLDoubleDateTransformerName];
}

+ (NSValueTransformer *)realSellTimeJSONTransformer{
    return [NSValueTransformer valueTransformerForName:MTLDoubleDateTransformerName];
}


@end
